Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sewing-kit/core

Package Overview
Dependencies
Maintainers
3
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sewing-kit/core

## Modeling

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

@sewing-kit/core

Modeling

Sewing-kit parses the shape of a codebase by modeling it into concepts it understands. At a high-level these these concepts are a Workspace and Project.

Project

A Project can be a either a Package (NPM library), WebApp (a react app) or Service (a Node.js server).

Workspace

A Workspace is a composition of Projects. It includes all the WebApp, Package, and Services for a given codebase.

Base

Workspace, WebApp, Package, and Service all extend a Base class. The Base class provides a number of useful properties for the classes extending it. These include the a root directory, the NPM dependencies used, and an fs property which should be used for all FileSystem related operations.

Core

Important classes to highlight here are TargetRuntime and TargetBuilder. In the context of sewing-kit, a target refers to the build output for a given Project.

TargetRuntime

The TargetRuntime class contains information about the runtime for a build target (eg. Does the build run in a Node.js or browser runtime?). This class provides a static utility, TargetRuntime.fromProject, to generate the TargetRuntime for a given Project.

TargetBuilder

This class is foundational to how sewing-kit generates build outputs for a given project. It's heavily used by the sewing-kit build CLI command. This class can also be used to plugin authors to generate custom build outputs (eg. multi-browser and multi-locale builds).

Installation

yarn add @sewing-kit/core --dev

FAQs

Package last updated on 03 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc